home *** CD-ROM | disk | FTP | other *** search
- ' PARS.ASC -- MSDOS QuickBASIC demonstration of PARSE.SUB 25 June 85
- ' by David L. Poskie (608) 274-9560
- ' 7118 Raymond Rd. Madison, WI 53719
- ' Please run any suggestions, corrections, additions, or changes by me.
- ' I can be messaged on all the major Madison, WI RBBS's.
-
- ' This variable is adjustable
- NumMax = 10 ' Maximum # of commands allowed
- DIM Cmd$(NumMax)
- GOTO Start
- Rem $Include: 'OMNI.SUB'
- Rem $Include: 'PARSE.SUB'
-
- Start:
- COLOR 14 , 3 , 8
- CLS
- LOCATE 10,1
- GOSUB Parse
- ' If there is no command
- IF Num = 0 _
- THEN SOUND 3333,.3 : _
- Text$ = "Syntax: PARSEDMO Cmd-1 Cmd-2 . . Cmd-10" : _
- GOSUB Center : _
- PRINT : PRINT : _
- Text$ = "Commands must be separated by one or more spaces": _
- GOSUB Center : _
- GOTO ParsExit
- ' If one or more commands exist
- Text$ = "The command line contained " + STR$(Num) + " command"
- IF Num > 1 _
- THEN Text$ = Text$ + "s"
- Text$ = Text$ + "."
- CLS
- LOCATE 2 , 1
- GOSUB Center
- PRINT
- FOR Temp = 1 TO Num
- Text$ = "Command #" + STR$(Temp) + " is " + Cmd$(Temp)
- GOSUB Center
- IF Temp < Num _
- THEN PRINT
- NEXT Temp
- ParsExit:
- SYSTEM